function t() {
    wx.navigateTo({
        url: "/pages/template/netOverTime"
    });
}

var e = require("util.js");

module.exports = {
    fetch: function(a) {
        return console.log(a), new Promise(function(n, o) {
            wx.request({
                url: a.url,
                method: a.method ? a.method : "POST",
                header: {
                    "content-type": "application/json",
                    pagePath: (0, e.currentPagePath)()
                },
                data: a.data,
                success: function(e) {
                    e.statusCode < 500 ? n(e.data) : (t(), o(e.data));
                },
                fail: function(e) {
                    t(), o(e);
                }
            });
        });
    }
};